package com.surpassun.emall.service;

import java.util.List;

import com.surpassun.emall.exception.NoSuchStoreException;
import com.surpassun.emall.model.Address;
import com.surpassun.emall.model.Store;
import com.surpassun.emall.model.StoreType;
import com.surpassun.emall.model.User;

public interface StoreService extends AbstractService<Store> {

	/**
	 * If the store is added by a administrator, he should choose who is the owner.
	 * If the store is added by a shopkeeper, then the owner will be himself.
	 * So the owner should be detected in the level of controller.
	 * 
	 * @param name : required
	 * @param type : required
	 * @param address : required
	 * @param owner : required
	 * @return
	 */
	public void addStore(String name, StoreType type, Address address, User owner);
	
	public void updateStore(Store store, String name, StoreType type, Address address, User owner);
	
	public void updateStore(long storeId, String name, StoreType type, Address address, User owner) throws NoSuchStoreException;

	public List<Store> getStoreByType(long typeId);

	public List<Store> getStoreByCity(long cityId);
}
